package fr.utbm.gi.in56.vehicle;

/**
 * 
 * Implementation of a model entry.
 *
 * @author Adrien Hoffer & Tarik Belabbas
 *
 */
public class ModelEntry implements Comparable< ModelEntry >
{
	/**
	 * The id of the model
	 */
	private int 	id;
	
	/**
	 * The name of the model
	 */
	private String 	model;
	
	/**
	 * Constructor
	 * 
	 * @param _id the id of the model
	 * @param _model the name of the model
	 */
	public ModelEntry( int _id, String _model)
	{
		this.id 	= _id;
		this.model 	= _model;
	}

	/**
	 * Returns the id of the model
	 *
	 * @return the id
	 */
	public int getId()
	{
		return this.id;
	}
	
	/**
	 * Returns the name of the model
	 * 
	 * @return the name of the model
	 */
	public String getModel()
	{
		return this.model;
	}

	@Override
	public int compareTo( ModelEntry _modelEntry )
	{
		return this.model.compareTo( _modelEntry.getModel() );
	}
}
